package org.zk.dubbo_provider.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import org.zk.dubbo_provider.dao.DanmuMapper;
import org.zk.entity.Danmup;
import org.zk.service.DanmuService;

import javax.annotation.Resource;
import java.util.List;
@Service(timeout = 10000)
public class DanmuServiceImpl implements DanmuService {

    @Resource
    DanmuMapper danmuMapper;
    @Override
    public boolean add(Danmup danmup) {

        int num = danmuMapper.add ( danmup );
        if(num>0){
            return true;
        }else{
            return false;
        }
    }

    @Override
    public List<Danmup> queryLesson(int id) {
        return danmuMapper.queryLesson (id);
    }
}
